//
//  YWAssetCheckManager.h
//  maintain
//
//  Created by 烟雨云渊 on 16/10/27.
//  Copyright © 2016年 ewin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "YWSingleton.h"

@class YWAssetCheckRecord;
@class YWAssetCheckRecordDetails;
@class YWReply;
@class YWHandler;

static NSString *const KRefreshAssetCheckRecordList = @"KRefreshAssetCheckRecordList";

@interface YWAssetCheckManager : NSObject
YWSingletonH(Manager)

#pragma mark - 资产清点表的更新、取值

/**
 *  更新资产清点表，数组更新
 *
 *  @param assetCheckArray model数组
 *
 *  @return 结果
 */
- (BOOL)updateAssetCheckWithArray:(NSArray*)checkArray;
/**
 *  获取资产清点表
 *
 *  @param page 页数
 *
 *  @return 结果
 */
- (NSArray*)assetCheckWithPage:(NSInteger)page locationId:(NSInteger)locationId;
/**
 *  获取资产清点表
 *
 *  @param stockId 库存表Id
 *
 *  @return 结果
 */
- (YWAssetCheckRecord*)assetCheckRecordWithCheckRecordId:(NSInteger)checkRecordId;
#pragma mark - 资产清点明细表的更新、取值
/**
 *  更新资产清点明细表，数组更新
 *
 *  @param assetCheckArray model数组
 *
 *  @return 结果
 */
- (BOOL)updateAssetCheckDetailWithArray:(NSArray*)checkDetailArray;

#pragma mark - 有关assetCheck的网络请求
/**
 *  请求清点记录
 *
 *  @return 结果
 */
- (void)requestAssetCheckRecordWithPage:(NSInteger)page pageSize:(NSInteger)pageSize locationId:(NSInteger)locationId WithComplete:(void(^)(BOOL success))complete;

/**
 *  上传清点记录
 *
 *  @return 结果
 */
- (void)postAssetCheckRecordWithCheckRecord:(YWAssetCheckRecord*)checkRecord recordDetails:(NSMutableArray*)recordDetails WithComplete:(void (^)(BOOL))complete;
/**
 *  上传清点评论
 *
 *  @return 结果
 */
- (void)postCheckRecordReplyWithReply:(YWReply*)reply atUser:(YWHandler*)atUser WithComplete:(void (^)(BOOL))complete;
@end
